#include <string>
#include <iostream>
using namespace std;
int main()
{	
	string a,b;
	cin>>a>>b;
	int count=0;
	for(int i=0;i<a.size()-1;i++)
	{
		if(a[i]!=b[i])
		{
			count++;
			a[i]=a[i]=='*'?'o':'*';
			a[i+1]=a[i+1]=='*'?'o':'*';	
		}	
	}
	cout<<count<<endl;
	return 0;
}
